package com.ypan.mail.entity;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @Author ypan
 * @Date on 2021/3/17  11:03
 * @Desc
 */
@Data
public class MailEntity implements Serializable {

    /**
     * 接受邮箱账户
     */
    @NotEmpty(message = "邮箱不可为空")
    @Email
    private String mail;

    /**
     * 邮箱标题
     */
    @NotEmpty(message = "邮箱标题不可为空")
    @Size(max = 10, min = 5)
    private String title;

    /**
     * 要发送的内容
     */
    @NotEmpty(message = "内容不可为空")
    @Size(max = 20, min = 5)
    private String content;


    /**
     * 要发送的内容
     */
    @NotEmpty(message = "接收方不可为空")
    private String caller;

}
